#include "finaldlg.h"

#include "ui_finaldlg.h"

FinalDlg::FinalDlg(QWidget *parent) : QDialog(parent),
                                      ui(new Ui::FinalDlg) {
    ui->setupUi(this);
    QPixmap pix(":/img/thumb.png");
    int w = ui->label_pic->width();
    int h = ui->label_pic->height();
    ui->label_pic->setPixmap(pix.scaled(w, h, Qt::KeepAspectRatio));
}

FinalDlg::~FinalDlg() {
    delete ui;
}

void FinalDlg::on_pushHistory_clicked() {
    emit showHistory();
}

void FinalDlg::on_pushReturn_clicked() {
    emit returnHome();
}

void FinalDlg::showBlack() {
    ui->label->setText("黑方获胜！");
}

void FinalDlg::showWhite() {
    ui->label->setText("白方获胜！");
}
